package com.sc.nft.controller;

import com.sc.nft.entity.vo.DaoSchoolTopHomeListVO;
import com.sc.nft.service.DaoSchoolTopService;
import com.sc.nft.sup.PageRequest;
import com.sc.nft.sup.PageResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * dao学堂的一级分类(DaoSchoolTop)表控制层
 *
 * @author makejava
 * @since 2023-03-13 16:13:47
 */

@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("daoSchoolTop")
@Api(tags = "首页")
public class DaoSchoolTopController {

    /**
     * 服务对象
     */
    private final DaoSchoolTopService daoSchoolTopService;

    @ApiOperation(value = "获取首页父集列表", notes = "获取首页父集列表", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_VALUE)
    @PostMapping(value = "/getHomeTopList", produces = MediaType.APPLICATION_JSON_VALUE)
    public PageResult<DaoSchoolTopHomeListVO> getHomeTopList(@RequestBody PageRequest pageRequest) {
        return PageResult.success(daoSchoolTopService.getHomeTopList(pageRequest));
    }



}
